#! /bin/bash

killall php

sleep 1

cd ../server
nohup php anna_server.php &
cd -

sleep 2

for dir in `ls`; do
    if [ ! -d "$dir" ]; then
        continue;
    fi
    if [ ! -f "$dir/main.php" ]; then
        continue;
    fi
    echo $dir
    cd $dir
    nohup php main.php &
    cd -
done

